﻿@model NotesVaultOnline.Data.Models.UserRegistration
@{
    ViewBag.Title = "Registration Form";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@using (Html.BeginForm())
{
    <div class="novo-form">

        @if (Model.Result != null)
        {
            <div class="control-group">
                @if (Model.Result.Type == NotesVaultOnline.Data.Models.CustomResult.ResultType.Error)
                {
                    <span class="alert alert-error btn-block">@Model.Result.Message</span>
                }
                else
                {
                    <span class="alert alert-success btn-block">You have successfully registered your account!</span>
                }
            </div>
        }
        <div class="control-group">
            <div class="clearfix">
                @Html.LabelFor(m => m.UserName, new { @class = "pull-left thick" })
                @Html.ValidationMessageFor(m => m.UserName, null, new { @class = "label label-important pull-right" })
            </div>
            @Html.TextBoxFor(m => m.UserName, new { @class = "btn-block", placeholder = "Your display name here..." })
        </div>
        <div class="control-group">
            <div class="clearfix">
                @Html.LabelFor(m => m.Password, new { @class = "pull-left thick" })
                @Html.ValidationMessageFor(m => m.Password, null, new { @class = "label label-important pull-right" })
            </div>
            @Html.PasswordFor(m => m.Password, new { @class = "btn-block", placeholder = "Your password here..." })
        </div>
        <div class="control-group">
            <div class="clearfix">
                @Html.LabelFor(m => m.ConfirmPassword, new { @class = "pull-left thick" })
                @Html.ValidationMessageFor(m => m.ConfirmPassword, null, new { @class = "label label-important pull-right" })
            </div>
            @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "btn-block", placeholder = "Retype your password here..." })
        </div>
        <div class="control-group">
            <div class="clearfix">
                @Html.LabelFor(m => m.Email, new { @class = "pull-left thick" })
                @Html.ValidationMessageFor(m => m.Email, null, new { @class = "label label-important pull-right" })
            </div>
            @Html.TextBoxFor(m => m.Email, new { @class = "btn-block", placeholder = "Your email address here..." })
        </div>
        <div class="control-group clearfix">
            @Html.CheckBoxFor(m => m.AutoLogin, new { @class = "pull-left" })
            @Html.LabelFor(m => m.AutoLogin, new { @class = "pull-left pad-left" })
        </div>
        <div class="control-group">
            <input type="submit" class="btn btn-primary btn-large btn-block" data-loading-text="Registering..." value="Register" />
        </div>
        <div class="control-group">
            @Html.ActionLink("Cancel", "Index", "Home", null, new { @class = "btn btn-large btn-block" })
        </div>
    </div>
}

